<template>
  <div>
    <el-button type="text" @click="batchhandler">批量删除</el-button>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-sizes="[20, 40, 60, 80, 100]"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>

<script>
import eventBus from '../../../utls/eventBus'
export default {
  props:['page','pageSize','total'],
    data(){
        return{
            // currentPage:1
        }
    },
    methods: {
      handleSizeChange(val) {
        this.$emit('changeSize', val);
      },
      handleCurrentChange(val) {
        this.$emit('changePage',val)
        console.log(`当前页: ${val}`);
      },
      batchhandler(){
        eventBus.$emit('batchtranfer')
      }
    },
}
</script>

<style lang="less">
.el-pagination{
  text-align: center;
}
</style>